package com.itheima.dao;

import com.github.pagehelper.Page;
import com.itheima.pojo.Role;
import com.itheima.pojo.Role;
import com.itheima.pojo.Role;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

public interface RoleDao {
    public Set<Role> findByUserId(Integer userId);

    public List<Role> findAllRole();
    /*public Set<Role> findByUserId(Integer userId);*/

    public void add(Role role);

    public void setRoleAndPermission(@Param("roleId")Integer roleId, @Param("permissionId")Integer permissionId);

    public Page<Role> findByCondition(String queryString);

    public Role findById(Integer id);


    public List<Integer> findPermissionIdsByRoleId(Integer id);

    public void edit(Role role);

    public void deleteAssoication(Integer id);

    public void deleteById(Integer id);

    public List<Role> findAll();


}
